package com.ruge.sms.error;

import com.ruge.core.exception.IError;
import lombok.AllArgsConstructor;

/**
 * @program: ruge-cloud
 * @description:
 * @author: ruge.wu
 * @create: 2022-01-09 01:07
 **/
@AllArgsConstructor
public enum SmsError implements IError {
    /**
     * 短信模块 error
     */
    SMS_HAS_SEND("0001", "短信已发送，请60秒后再试!"),
    CODE_HAS_OVER("0002", "验证码不存在，请重新发送!"),
    CODE_VALID_FAILED("0003", "验证码匹配失败，请重新输入!"),
    ;

    private static final String NAME_SPACE = "SMS";

    private String errorCode;
    private String errorMessage;

    @Override
    public String getNamespace() {
        return NAME_SPACE;
    }

    @Override
    public String getErrorCode() {
        return NAME_SPACE + "." + errorCode;
    }

    @Override
    public String getErrorMessage() {
        return errorMessage;
    }
}
